package com.digitalchina.lxnsy.zbsy;

import android.view.ViewGroup;

import java.util.ArrayList;
import java.util.List;

import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;

public class FragmentAdapter extends FragmentPagerAdapter {
    private List<Fragment> list;

    public FragmentAdapter(FragmentManager fm, List<Fragment> list) {
        super(fm);
        if (list != null) {
            this.list = list;
        } else {
            this.list = new ArrayList<>();
        }
    }




    @Override
    public Fragment getItem(int position) {

        return list.get(position);
    }

    @Override
    public int getCount() {

        return list.size();
    }

    @Override
    public void destroyItem(ViewGroup container, int position, Object object) {
    }

}


